import { App } from 'vue'
import {
  ElButton,
  ElRow,
  ElDropdown,
  ElDropdownItem,
  ElDropdownMenu,
  ElCol,
  ElSubmenu,
  ElMenuItem,
  ElMenuItemGroup,
  ElMenu,
  ElBreadcrumb,
  ElBreadcrumbItem,
  ElTable,
  ElTableColumn,
  ElPopover,
  ElDialog,
  ElInput,
  ElForm,
  ElFormItem,
  ElPagination
} from 'element-plus'

export default function (app: App) {
  const components = [
    ElButton,
    ElRow,
    ElDropdown,
    ElDropdownItem,
    ElDropdownMenu,
    ElCol,
    ElSubmenu,
    ElMenuItem,
    ElMenuItemGroup,
    ElMenu,
    ElBreadcrumb,
    ElBreadcrumbItem,
    ElTable,
    ElTableColumn,
    ElPopover,
    ElDialog,
    ElInput,
    ElForm,
    ElFormItem,
    ElPagination
  ]
  const c = components.length

  for (let i = 0; i < c; i++) {
    const component = components[i]
    app.component(component.name, component)
  }
}
